package com.shiyi;

import com.shiyi.service.DubboDemoService;
import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * {@link EnableDubboConfig 强制扫描dubbo的配置信息}
 * @author qiu
 */
@EnableDubboConfig
@SpringBootApplication
public class ProviderApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(ProviderApplication.class, args);
        DubboDemoService dubboDemoService = applicationContext.getBean(DubboDemoService.class);
        System.out.println(dubboDemoService);
    }

}
